import { GET } from "./api";

// -----------客户平均停电时间--------------------
// 1-1计划值&完成率
export const avg =  (param)=> {
    return GET("/customerOutageTime/avg", param)
}

// 1-3计划值&完成率 by线路
export const selectPlanByDateAndLine =  (param)=> {
    return GET("/customerOutageTime/selectPlanByDateAndLine", param)
}

// 1-2客户平均停电时间&预约排平均停电时间&故障平均停电时间
export const avgByDate =  (param)=> {
    return GET("/customerOutageTime/avgByDate", param)
}

// 1-4客户平均停电时间&预约排平均停电时间&故障平均停电时间 - 柱状图
export const avgByLine =  (param)=> {
    return GET("/customerOutageTime/avgByLine", param)
}


// -----------客户平均停电时间（累计）--------------------
// 1-5计划值&完成率
export const avgRange =  (param)=> {
    return GET("/customerOutageTime/avgRange", param)
}

// 1-7计划值&完成率 按照线路
export const selectPlanByDateAndLineRange =  (param)=> {
    return GET("/customerOutageTime/selectPlanByDateAndLineRange", param)
}

// 1-6客户平均停电时间&预约排平均停电时间&故障平均停电时间
export const avgByDateRange =  (param)=> {
    return GET("/customerOutageTime/avgByDateRange", param)
}

// 1-8客户平均停电时间&预约排平均停电时间&故障平均停电时间 - 柱状图
export const avgByLineRange =  (param)=> {
    return GET("/customerOutageTime/avgByLineRange", param)
}


// -----------中压线路故障率--------------------
// 2-1停电次数
export const getSumOutageCountByMonth =  (param)=> {
    return GET("/mediumVoltageFailureRate/getSumOutageCountByMonth", param)
}

// 2-2累计完成&年度目标
export const getCompletionAndTargetByDate =  (param)=> {
    return GET("/mediumVoltageFailureRate/getCompletionAndTargetByDate", param)
}

// 2-3累计完成&年度目标 柱状图
export const getCompletionAndTargetByLine =  (param)=> {
    return GET("/mediumVoltageFailureRate/getCompletionAndTargetByLine", param)
}

// -----------中压线路故障率原因分析--------------------
// 2-4原因分析
export const getMediumVoltageFailureAnalysis =  (param)=> {
    return GET("/mediumVoltageFailureRate/getMediumVoltageFailureAnalysis", param)
}

// -----------线路中压/低压指标完成情况--------------------
// 3-1至3-4线路中压/低压指标完成情况
export const getByLineAndType =  (param)=> {
    // ?startDate=2025-01-01&endDate=2025-12-31&indicatorType=中压
    return GET("/lineIndicatorCompletion/getByLineAndType", param)
}
// 红榜
export const getRedList =  (param)=> {
    // ?startDate=2025-01-01&endDate=2025-12-31&indicatorType=中压
    return GET("/equipmentZeroFaultDays/redList", param)
}
// 黑榜
export const getBlackList =  (param)=> {
    // ?startDate=2025-01-01&endDate=2025-12-31&indicatorType=中压
    return GET("/equipmentZeroFaultDays/blackList", param)
}

// -----------部门举措完成情况--------------------
// 部门举措完成情况
export const selectDepartmentCompletion =  (param)=> {
    // ?startDate=2025-03&endDate=2025-03
    return GET("/departmentMeasureCompletion/selectDepartmentCompletion", param)
}

// -----------地图--------------------
// 地图
export const selectMapDate =  (param)=> {
    return GET("/mapData/selectMapDate", param)
}

// 地图-平均值
export const selectAvgMapDate =  (param)=> {
    // ?startDate=2025-01-01&endDate=2025-12-31&indicatorType=中压
    return GET("/mapData/selectAvgMapDate", param)
}




